if(obj.event === '{$name}'){
  layer.prompt({
    formType: {$type}
    ,title: '{$title}'
    ,value: data.{$name}
  }, function(value, index){
    $.post('{$url}',{id:data.id,field_name:'{$name}',field_value:value},function(res){
      if(res.code==1){
        obj.update({{$name}: value});
        layer.close(index);
      }else{
        layer.msg(res.msg);
      }
    });
  });
}
